fs::mkdir(&foo.root().join("tmp"), io::USER_EXEC ^ io::USER_EXEC).unwrap();
assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
execs().with_status(0));
+ fs::chmod(&foo.root().join("tmp"), io::USER_DIR).unwrap();
})
+
+ test!(bad_cargo_config {
+ let foo = project("foo")
+ .file("Cargo.toml", r#"
+ [package]
+ name = "foo"
+ version = "0.0.0"
+ authors = []
+ "#)
+ .file("src/lib.rs", "")
+ .file(".cargo/config", r#"
+ this is not valid toml
+ "#);
+ assert_that(foo.cargo_process("build").arg("-v"),
+ execs().with_status(101).with_stderr("\
+ Couldn't load Cargo configuration
+
+ Caused by:
+ could not parse Toml manifest; path=[..]
+
+ Caused by:
+ could not parse input TOML
+ [..].cargo[..]config:2:20-2:21 expected `=`, but found `i`
+
+ "));
+ })